package lesson14;

public class Car {

	String model;
	double maxSpeed;
	double currentSpeed;
	String color;
	int currentGear;
	Person owner;
	
	void accelerate(int speedUp)
	{
		currentSpeed += speedUp;
	}
	
	void changeGearUp()
	{
		if(currentGear < 5)
		currentGear++;
	}
	
	void changeGearDown()
	{
		if (currentGear > 1)
		currentGear--;
	}
	
	void changeGear(int nextGear)
	{
		if (nextGear >= 1 && nextGear <= 5)
		currentGear = nextGear;
	}
	
	void changeColor(String newColor)
	{
		color = newColor;
	}
}
